package com.hqj.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope   /*注解手动刷新*/
public class ClientController {

    @Value("${hqj.name}")
    private String name;
    @Value("${hqj.sex}")
    private String sex;
    @Value("${hqj.age}")
    private Integer age;
    @Value("${hqj.address}")
    private String address;


    @RequestMapping("/getConfigInfo")
    public String getConfigInfo(){
        return "名称:"+name+",性别:"+sex+",年龄:"+age+",address:"+address;
    }
}
